package com.bltec.emergency.service.mapsService.impl;

import com.bltec.emergency.mapper.MapsMapper;
import com.bltec.emergency.model.Maps;
import com.bltec.emergency.service.mapsService.MapsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class MapsServiceImpl implements MapsService {
    @Resource
    private MapsMapper mapsMapper;
    @Override
    public boolean add(Maps maps) {
        return mapsMapper.insert(maps);
    }

    @Override
    public boolean deleteMapsById(Long id) {
        return mapsMapper.setDisableById(id);
    }

    @Override
    public boolean updateMapsById(Maps maps) {
        return mapsMapper.updateMapsById(maps);
    }

    @Override
    public Maps getMapsById(Long id) {
        return mapsMapper.getMapsById(id);
    }

    @Override
    public List<Maps> getAll() {
        return mapsMapper.selectAll();
    }
}
